<template>
  <div>
    <div class="search">
      <div class="time"><p class="hinttime">消息时间</p> 
       <el-date-picker
      v-model="value1"
      type="daterange"
      range-separator="至"
      start-placeholder="开始日期"
      end-placeholder="结束日期">
    </el-date-picker></div>
      <div class="time"><p class="hinttime">消息状态</p>  <el-radio-group v-model="radio">
    <el-radio :label="3">全部</el-radio>
    <el-radio :label="6">已读</el-radio>
    <el-radio :label="9">未读</el-radio>
  </el-radio-group></div>
      <div class="time" ><p class="hinttime">消息类型</p>
       <el-radio-group v-model="radio">
    <el-radio :label="3">全部</el-radio>
    <el-radio :label="6">审批通知</el-radio>
    <el-radio :label="9">预警信息</el-radio>
  </el-radio-group>
      </div>
      <div class="time" >
        <p class="hinttime" style="margin-left:15px"></p><el-button type="primary" icon="el-icon-search">搜索</el-button>
      </div>
    </div>
    <div class="contentlist">
       <el-table
       @cell-click="click"
      :cell-style="cellstyle"
    :data="tableData3"
    border
    style="width: 100%">
    <el-table-column
      prop="date"
      label="状态"
      width="150">
    </el-table-column>
     <el-table-column
      prop="date"
      label="消息类型"
      width="150">
    </el-table-column>
    <el-table-column
      prop="address"
      label="主题"
      class-name="nameclass"
      width="449">
    </el-table-column>
   
    <el-table-column
      prop="name"
      label="时间"
      width="150">
    </el-table-column>
    <el-table-column
      prop="status"
      width="100"
      
      label="查看">
    </el-table-column>
  </el-table>
  <div class="page">
<el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page.sync="currentPage3"
      :page-size="100"
      layout="prev, pager, next, jumper"
      :total="tableData3.length">
    </el-pagination>
  </div>
   
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      currentPage3:1,
      value1:'',
      radio:'1',
         tableData3: [{
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          status:'查看'
        }, {
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          status:'查看'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          status:'查看'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          status:'查看'
        }, {
          date: '2016-05-08',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          status:'查看'
        }, {
          date: '2016-05-06',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          status:'查看'
        }, {
          date: '2016-05-07',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
          status:'查看'
        }]
    }
  },
  methods: {
    click(row,column,cell,event){
      console.log(row)
      
    console.log(column)
    console.log(cell)
    console.log(event)
// this.open()
    },
       open() {
        this.$alert('这是一段内容', '标题名称', {
          confirmButtonText: '确定',
          callback: action => {
            // this.$message({
            //   type: 'info',
            //   message: `action: ${ action }`
            // });
          }
        });
      },
       handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
      },
     cellstyle({ row, column, rowIndex, columnIndex }){
 if (columnIndex === 4) {
        // 指定列号
        return 'color:#0000FF;text-decoration: underline;'
      } 
    },
  },
}
</script>
<style lang="scss">
.time{
  display: flex;
  align-items: center;
}
.hinttime{
  margin-right: 20px;
  margin-left: 30px;
  font-weight: 500;
}
.contentlist{
  width: 1000px;
  margin: 0 auto;
  margin-top: 50px;
  margin-bottom: 100px;
}
.page{
  width: 100%;
  display: flex;
  flex-direction: row-reverse;
  margin-top: 10px;
}
</style>